cmake_minimum_required(VERSION 3.16)

# 项目名称和版本
project(IoT-monitor-platform VERSION 1.0.0)

# 设置 Qt 6.8.3 路径
set(CMAKE_PREFIX_PATH "G:/develop/QT/6.8.3/mingw_64")  # 根据实际 Qt 安装路径修改

# 设置输出目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

# 设置安装前缀（可选）
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
    set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory" FORCE)
endif()

# 包含公共配置
include(cmake/common.cmake)

# 添加子目录
add_subdirectory(server)
add_subdirectory(client)